{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "bc92e6f7",
   "metadata": {},
   "outputs": [],
   "source": [
    "import tensorflow as tf"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "be9fa026",
   "metadata": {},
   "outputs": [],
   "source": [
    "import tensorflow as tf\n",
    "import pandas as pd \n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "24e4f6fc",
   "metadata": {},
   "outputs": [],
   "source": [
    "data=pd.read_csv('./data/Advertising.csv')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "9ba4e185",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Unnamed: 0</th>\n",
       "      <th>TV</th>\n",
       "      <th>radio</th>\n",
       "      <th>newspaper</th>\n",
       "      <th>sales</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>230.1</td>\n",
       "      <td>37.8</td>\n",
       "      <td>69.2</td>\n",
       "      <td>22.1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>44.5</td>\n",
       "      <td>39.3</td>\n",
       "      <td>45.1</td>\n",
       "      <td>10.4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>17.2</td>\n",
       "      <td>45.9</td>\n",
       "      <td>69.3</td>\n",
       "      <td>9.3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4</td>\n",
       "      <td>151.5</td>\n",
       "      <td>41.3</td>\n",
       "      <td>58.5</td>\n",
       "      <td>18.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5</td>\n",
       "      <td>180.8</td>\n",
       "      <td>10.8</td>\n",
       "      <td>58.4</td>\n",
       "      <td>12.9</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Unnamed: 0     TV  radio  newspaper  sales\n",
       "0           1  230.1   37.8       69.2   22.1\n",
       "1           2   44.5   39.3       45.1   10.4\n",
       "2           3   17.2   45.9       69.3    9.3\n",
       "3           4  151.5   41.3       58.5   18.5\n",
       "4           5  180.8   10.8       58.4   12.9"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "458789ff",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.collections.PathCollection at 0x7f82c0879b80>"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAD4CAYAAAD1jb0+AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAjEklEQVR4nO2dfWwd13nmn1fUtZZyDFNeM16ZsSy1CKyN08aMiawBFUHltnFiN7FSo2mDtnCxQfVPCtTeVFhlG6yVFItw4yZBgQIFHDio2xqukshlnLqoXcRqjQTrZMlQsmxY2iT1R3ItWExt5sNi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8ngLcDeCbPfgBv6R+jLQB29Y/dSNNjyBnLIQB/nPLa0MeyHcDb+48vA/D/+jbHemxM44nu+AAQAG/oP+4A+AaAm3wcm9Bn4O8A8B1V/TdVPQfg7wDc3rBNVXA7gAf6jx8AsK85U7JR1ScBvDq02WT/7QD+TlV/pqrPA/gOescwCAxjMRH6WE6r6rf6j38M4DkAE4j32JjGYyLY8WiPn/T/7PT/KTwcm9AFfALA9wb+/j6yD2qIKIDHRWRORPb3t12lqqeB3g8XwBsbs64YJvtjPV5/KCJP910syW1tNGMRkZ0AJtGb6UV/bIbGA0R4fERkRESOATgD4J9V1cuxCV3AJWVbbHGPe1T17QDeA+DDIvLOpg3ySIzH6y8B/DyAGwCcBvDp/vYoxiIibwBwBMBdqvqjrJembIthPFEeH1W9oKo3AHgTgHeIyFszXl54LKEL+PcBXDPw95sAvNyQLYVQ1Zf7/58B8Pfo3Rq9IiLbAaD//5nmLCyEyf7ojpeqvtI/2VYAfA4Xb12DH4uIdNATuwdV9eH+5miPTdp4Yj4+AKCqiwD+BcC74eHYhC7g/xfAm0Vkl4hcAuC3ATzSsE3WiMilInJZ8hjAuwA8g94Y7uy/7E4AX27GwsKY7H8EwG+LyBYR2QXgzQC+2YB91iQnVJ/3o3d8gMDHIiIC4H4Az6nqZwaeivLYmMYT4/ERkXERGes/HgXwqwBOwsexaXrF1mJF91b0VqS/C+BPmrbH0fafQ291+TiAZxP7AfxHAF8F8O3+/1c0bWvGGB5C79Z1Gb2Zwoey7AfwJ/1jdQrAe5q232IsfwPgBICn+yfS9kjG8kvo3WY/DeBY/9+tER8b03iiOz4AfhHAfN/mZwD8z/72yo8NU+kJISRSQnehEEIIMUABJ4SQSKGAE0JIpFDACSEkUijghBASKRRwQgiJFAo4IYREyv8HgFNewMkVws4AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.scatter(data.TV,data.sales)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "546c950b",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.collections.PathCollection at 0x7f82c07aa040>"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAD4CAYAAAD1jb0+AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAih0lEQVR4nO2db4wd1XnGn3eXS1hDmjXFULPBWVeKTEJcvGKVILkfsNvgNCawgSYUJRFVovpLUgWXbrPJBzBNIlahDamUqqoTUIhCqUlMHBNHJQic0lgN6TprA5aNEoW/awtvBEsI3sD17tsP91777tz5P2dmzpl5fpLl3dm7O2funfPMe97znPeIqoIQQoh79JXdAEIIIemggBNCiKNQwAkhxFEo4IQQ4igUcEIIcZQzijzZeeedp8PDw0WekhBCnGf//v2/UdUV3uOFCvjw8DCmpqaKPCUhhDiPiDznd5wpFEIIcRQKOCGEOAoFnBBCHIUCTgghjkIBJ4QQRynUhUIIIVVm1/QM7njoaRydm8eFgwMY37QGYyNDuZ2PAk4IIQbYNT2Dzz/wJOabCwCAmbl5fP6BJwEgNxFnCoUQQgxwx0NPnxLvDvPNBdzx0NO5nZMCTgghBjg6N5/ouAko4IQQYoALBwcSHTcBBZwQQgwwvmkNBhr9S44NNPoxvmlNbufkJCYhxFmKdn2E0TkvXSiEEBJBGa6PKMZGhgo9N1MohBAnKcP1YRsUcEKIk5Th+rANCjghxEnKcH3YBgWcEOIkZbg+bIOTmIQQ6wlzm9jiQikDUdXCTjY6OqrcUo0QkgSv26TD4EAD266+pEewy7YW5nF+EdmvqqPe44zACSFW4+c2AYC5+WaPbbBsa2HR52cOnBBiNWGuEq9tsGxr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ZIvLWztcArgTwFAxesxMrMUXkg2jlz/oB3K2qXy63ReYRkfsAXIFWqcmXANwKYBeA+wGsAvA8gI+oqnei01lE5E8B/A+AJ3E6L/oFtPLgVb7uP0Fr8qofrSDqflX9RxH5Q1T4uju0Uyh/r6pXVfmaReSP0Yq6gVa6+j9U9csmr9kJASeEENKLCykUQgghPlDACSHEUSjghBDiKBRwQghxFAo4IYQ4CgWcEEIchQJOCCGO8v93nowBbeUu9wAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.scatter(data.radio,data.sales)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "13191447",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.collections.PathCollection at 0x7f82c027fe50>"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAD4CAYAAAD1jb0+AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAjUElEQVR4nO2dfZAd1Xnmn3dGF5iBxCOCzEpjhLRbLohllaXVlM2utrYsvAmJMUaBWmPKzpJa1+qfZNdoKTbjjWvBtWwxFWLjVOWjQoLXeEMRkYiMiUkFuyxtKFMx2ZElDARp7Q2fgxbkReMPNITR6N0/7m3R09On+3T36e5z+j6/KpVmevrePn1v93NOP+973iOqCkIIIeEx0nYDCCGElIMCTgghgUIBJ4SQQKGAE0JIoFDACSEkUNY0ebCLLrpIN23a1OQhCSEkeA4dOvQDVV2X3N6ogG/atAlzc3NNHpIQQoJHRF5I204LhRBCAoUCTgghgUIBJ4SQQKGAE0JIoFDACSEkUBrNQiH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J99HMCWwWt+b6ArncBrAQfwfgDfV9W/V9W3APwJgGtbblNhVPW4qn5n8POP0ReESfTP5b7BbvcB2N1KAysgIu8CcDWAP4ptDva8ROSnAfxLAPcCgKq+paoLCPicYqwBMCYiawCMA3gFAZ6Xqj4G4PXEZtN5XAvgT1T1H1T1OQDfR19XOoHvAj4J4KXY7y8PtgWLiGwCsB3AEwAuVtXjQF/kAbyzxaaV5YsA/hOAM7FtIZ/XPwZwAsB/H9hCfyQi5yPsc4KqzgP4LQAvAjgO4Ieq+nUEfl4xTOfROQ2J47uAS8q2YPMeReQCAPsB3KyqP2q7PVURkY8AeE1VD7XdFoesAfBPAfy+qm4H8AbCsBUyGXjC1wLYDGADgPNF5JPttqoROqUhSXwX8JcBXBL7/V3oP/YFh4j00Bfv+1X1ocHmV0Vk/eDv6wG81lb7SrITwEdF5Hn07a0rReSPEfZ5vQzgZVV9YvD7n6Ev6CGfEwD8KwDPqeoJVV0C8BCAf47wzyvCdB6d0ZA0fBfw/wXg3SKyWUTOQT8Y8XDLbSqMiAj6nuqzqvqF2J8eBnDT4OebAHy16bZVQVU/o6rvUtVN6H83B1T1kwj4vFT1/wJ4SUQuG2z6EIC/Q8DnNOBFAFeIyPjgevwQ+rGY0M8rwnQeDwP4uIicKyKbAbwbwN+20L56UFWv/wH4MID/DeD/APiNtttT8hz+BfqPbd8FcGTw78MAfgb9iPn3Bv9f2HZbK5zjBwF8bfBz0OcFYBuAucH3NQtgbejnNDivzwE4CuBpAP8DwLkhnheAB9D38ZfQH2F/Kus8APzGQD+OAfjFttvv8h+n0hNCSKD4bqEQQggxQAEnhJBAoYATQkigUMAJISRQKOCEEBIoFHBCCAkUCjghhATK/wfI8HvvE1KsDwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.scatter(data.newspaper,data.sales)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "103bf145",
   "metadata": {},
   "outputs": [],
   "source": [
    "x=data.iloc[:,1:-1]\n",
    "y=data.iloc[:,-1]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "5084a128",
   "metadata": {},
   "outputs": [],
   "source": [
    "model=tf.keras.models.Sequential()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "679582be",
   "metadata": {},
   "outputs": [],
   "source": [
    "model.add(tf.keras.layers.Dense(10,input_shape=(3,),activation='relu'))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "eb673e1a",
   "metadata": {},
   "outputs": [],
   "source": [
    "model.add(tf.keras.layers.Dense(1))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "503c6df2",
   "metadata": {},
   "outputs": [],
   "source": [
    "model.compile(optimizer=\"adam\",\n",
    "             loss=\"mse\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "febb3056",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch 1/100\n",
      "7/7 [==============================] - 1s 3ms/step - loss: 4506.1242\n",
      "Epoch 2/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 3959.6158\n",
      "Epoch 3/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 3281.1070\n",
      "Epoch 4/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 2365.6260\n",
      "Epoch 5/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 2149.8265\n",
      "Epoch 6/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 1687.2287\n",
      "Epoch 7/100\n",
      "7/7 [==============================] - 0s 1ms/step - loss: 1344.3525\n",
      "Epoch 8/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 1061.9155\n",
      "Epoch 9/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 882.9470\n",
      "Epoch 10/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 642.1866\n",
      "Epoch 11/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 523.3276\n",
      "Epoch 12/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 473.2607\n",
      "Epoch 13/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 333.1702\n",
      "Epoch 14/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 304.2179\n",
      "Epoch 15/100\n",
      "7/7 [==============================] - 0s 1ms/step - loss: 259.6349\n",
      "Epoch 16/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 239.2918\n",
      "Epoch 17/100\n",
      "7/7 [==============================] - 0s 1ms/step - loss: 203.7096\n",
      "Epoch 18/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 182.0384\n",
      "Epoch 19/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 164.5743\n",
      "Epoch 20/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 168.3734\n",
      "Epoch 21/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 153.4953\n",
      "Epoch 22/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 149.7917\n",
      "Epoch 23/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 165.7024\n",
      "Epoch 24/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 161.8081\n",
      "Epoch 25/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 153.8975\n",
      "Epoch 26/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 152.6829\n",
      "Epoch 27/100\n",
      "7/7 [==============================] - 0s 1ms/step - loss: 151.8850\n",
      "Epoch 28/100\n",
      "7/7 [==============================] - 0s 1ms/step - loss: 129.5236\n",
      "Epoch 29/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 146.8378\n",
      "Epoch 30/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 130.6559\n",
      "Epoch 31/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 149.5312\n",
      "Epoch 32/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 125.6043\n",
      "Epoch 33/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 117.7921\n",
      "Epoch 34/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 141.8015\n",
      "Epoch 35/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 124.9911\n",
      "Epoch 36/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 142.0119\n",
      "Epoch 37/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 113.5413\n",
      "Epoch 38/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 137.4233\n",
      "Epoch 39/100\n",
      "7/7 [==============================] - 0s 1ms/step - loss: 113.4369\n",
      "Epoch 40/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 123.4407\n",
      "Epoch 41/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 113.1009\n",
      "Epoch 42/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 111.7985\n",
      "Epoch 43/100\n",
      "7/7 [==============================] - 0s 1ms/step - loss: 110.5973\n",
      "Epoch 44/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 116.7557\n",
      "Epoch 45/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 115.9172\n",
      "Epoch 46/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 112.8622\n",
      "Epoch 47/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 117.1106\n",
      "Epoch 48/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 110.5202\n",
      "Epoch 49/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 119.2229\n",
      "Epoch 50/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 104.6109\n",
      "Epoch 51/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 104.0081\n",
      "Epoch 52/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 99.5739\n",
      "Epoch 53/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 107.5528\n",
      "Epoch 54/100\n",
      "7/7 [==============================] - 0s 1ms/step - loss: 119.4054\n",
      "Epoch 55/100\n",
      "7/7 [==============================] - 0s 1ms/step - loss: 94.6849\n",
      "Epoch 56/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 102.3696\n",
      "Epoch 57/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 94.1026\n",
      "Epoch 58/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 108.1746\n",
      "Epoch 59/100\n",
      "7/7 [==============================] - 0s 1ms/step - loss: 87.4593\n",
      "Epoch 60/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 98.2044\n",
      "Epoch 61/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 98.9075\n",
      "Epoch 62/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 90.5090\n",
      "Epoch 63/100\n",
      "7/7 [==============================] - 0s 1ms/step - loss: 85.9015\n",
      "Epoch 64/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 85.5844\n",
      "Epoch 65/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 94.6543\n",
      "Epoch 66/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 93.1237\n",
      "Epoch 67/100\n",
      "7/7 [==============================] - 0s 1ms/step - loss: 91.3090\n",
      "Epoch 68/100\n",
      "7/7 [==============================] - 0s 1ms/step - loss: 83.1571\n",
      "Epoch 69/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 68.9882\n",
      "Epoch 70/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 82.0968\n",
      "Epoch 71/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 79.1693\n",
      "Epoch 72/100\n",
      "7/7 [==============================] - 0s 1ms/step - loss: 71.8421\n",
      "Epoch 73/100\n",
      "7/7 [==============================] - 0s 1ms/step - loss: 68.3242\n",
      "Epoch 74/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 75.2449\n",
      "Epoch 75/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 81.3117\n",
      "Epoch 76/100\n",
      "7/7 [==============================] - 0s 1ms/step - loss: 69.0349\n",
      "Epoch 77/100\n",
      "7/7 [==============================] - 0s 1ms/step - loss: 70.4254\n",
      "Epoch 78/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 65.7903\n",
      "Epoch 79/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 64.8517\n",
      "Epoch 80/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 72.9604\n",
      "Epoch 81/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 61.4851\n",
      "Epoch 82/100\n",
      "7/7 [==============================] - 0s 1ms/step - loss: 64.0091\n",
      "Epoch 83/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 67.7829\n",
      "Epoch 84/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 61.1612\n",
      "Epoch 85/100\n",
      "7/7 [==============================] - 0s 1ms/step - loss: 67.0638\n",
      "Epoch 86/100\n",
      "7/7 [==============================] - 0s 1ms/step - loss: 66.4575\n",
      "Epoch 87/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 61.9345\n",
      "Epoch 88/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 57.7143\n",
      "Epoch 89/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 57.6846\n",
      "Epoch 90/100\n",
      "7/7 [==============================] - 0s 1ms/step - loss: 57.0891\n",
      "Epoch 91/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 59.2385\n",
      "Epoch 92/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 64.6646\n",
      "Epoch 93/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 49.4059\n",
      "Epoch 94/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 52.9548\n",
      "Epoch 95/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 57.4573\n",
      "Epoch 96/100\n",
      "7/7 [==============================] - 0s 1ms/step - loss: 46.6256\n",
      "Epoch 97/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 53.3309\n",
      "Epoch 98/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 52.7985\n",
      "Epoch 99/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 50.6040\n",
      "Epoch 100/100\n",
      "7/7 [==============================] - 0s 2ms/step - loss: 47.9169\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "<tensorflow.python.keras.callbacks.History at 0x7f82c094ed00>"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "model.fit(x,y,epochs=100)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "29a5d7da",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Model: \"sequential\"\n",
      "_________________________________________________________________\n",
      "Layer (type)                 Output Shape              Param #   \n",
      "=================================================================\n",
      "dense (Dense)                (None, 10)                40        \n",
      "_________________________________________________________________\n",
      "dense_1 (Dense)              (None, 1)                 11        \n",
      "=================================================================\n",
      "Total params: 51\n",
      "Trainable params: 51\n",
      "Non-trainable params: 0\n",
      "_________________________________________________________________\n"
     ]
    }
   ],
   "source": [
    "model.summary()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "id": "5cbc5e1c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[24.683786  ],\n",
       "       [ 7.1903324 ],\n",
       "       [ 8.301196  ],\n",
       "       [15.011597  ],\n",
       "       [24.356518  ],\n",
       "       [ 8.472278  ],\n",
       "       [ 2.3840039 ],\n",
       "       [ 8.787994  ],\n",
       "       [ 0.87433827],\n",
       "       [19.134996  ]], dtype=float32)"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "test=data.iloc[:10,1:-1]\n",
    "model.predict(test)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "0df671b3",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0    22.1\n",
       "1    10.4\n",
       "2     9.3\n",
       "3    18.5\n",
       "4    12.9\n",
       "5     7.2\n",
       "6    11.8\n",
       "7    13.2\n",
       "8     4.8\n",
       "9    10.6\n",
       "Name: sales, dtype: float64"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.iloc[:10,-1]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "id": "8d7a605d",
   "metadata": {},
   "outputs": [
    {
     "ename": "AttributeError",
     "evalue": "module 'pandas' has no attribute 'Seris'",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mAttributeError\u001b[0m                            Traceback (most recent call last)",
      "\u001b[0;32m<ipython-input-23-b8b630ad2340>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mpd\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mSeris\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mtest\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[0;32m~/anaconda3/lib/python3.8/site-packages/pandas/__init__.py\u001b[0m in \u001b[0;36m__getattr__\u001b[0;34m(name)\u001b[0m\n\u001b[1;32m    242\u001b[0m         \u001b[0;32mreturn\u001b[0m \u001b[0m_SparseArray\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    243\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 244\u001b[0;31m     \u001b[0;32mraise\u001b[0m \u001b[0mAttributeError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34mf\"module 'pandas' has no attribute '{name}'\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    245\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    246\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;31mAttributeError\u001b[0m: module 'pandas' has no attribute 'Seris'"
     ]
    }
   ],
   "source": [
    "pd.Seris(test)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "55657aa5",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.11"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
